package com.qf.adminService.impl;

import com.qf.adminDao.AdminUserDao;
import com.qf.adminService.AdminUserService;
import com.qf.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author bss
 * @version V1.0
 * @Project maven
 * @Package com.qf.adminService.impl
 * @Description:
 * @Date 2022/10/4 16:36
 */
@Service
public class AdminUserServiceImpl implements AdminUserService {

    @Autowired
    AdminUserDao adminUserDao;
    @Override
    public User findUseByNameAndPwd(String username, String password) {
        User user = adminUserDao.findByNameAndPwd(username, password);
        return user;
    }

    @Override
    public List<User> selectAllUser() {
        List<User> userList = adminUserDao.selectAllUser();
        return userList;
    }

    @Override
    public void deleteUser(int id) {
        adminUserDao.deleteUser(id);
    }

    @Override
    public List<User> findUseByNameAndGender(String username, String gender) {
        List<User> userList = adminUserDao.findByNameAndGender(username, gender);
        return userList;
    }

    @Override
    public List<User> findInvalidUser() {
        List<User> invalidUser = adminUserDao.findInvalidUser();
        return invalidUser;
    }
}
